
#encoding=UTF-8

from Error import *
from Building import *

class DefensiveBuilding(Building):
	def __init__(self):
		Building.__init__(self)

	def _HitPointsIndex(self):
		return 3

	def _BuildCostType(self):
		return 0 #gold

	def _BuildCostIndex(self):
		return 4

	def _BuildTimeIndex(self):
		return 5

	def _ExperienceGainedIndex(self):
		return 6

	def _TownHallLevelRequiredIndex(self):
		return 7

	def GetDamagePerSecond(self, level):
		idx = self._DamagePerSecondIndex()
		return int(self.level_info[level][idx])

	def GetDamagePerShot(self, level):
		return self.GetDamagePerSecond(level)*self.GetAttackSpeed()

	def GetAttackSpeed(self):
		raise InternalError

	def _DamagePerSecondIndex(self):
		return 1

